package com.guigu.www.mapper;

import com.guigu.www.pojo.BespeakPoject;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author DengHao
 * @since 2021-10-21
 */
public interface BespeakPojectMapper extends BaseMapper<BespeakPoject> {
/*根据套餐id查询对应的项目  -- 陈显科*/
@Select(" SELECT * FROM bespeak_poject WHERE bes_pro_id IN (SELECT bes_pro_id FROM bes_sm_pro WHERE bes_sm_id=#{id})")
List<BespeakPoject> bespeakProject(int id);

/*根据id查询体检项目的总数  -- 陈显科*/
@Select(" SELECT count(*) FROM bespeak_poject WHERE bes_pro_id IN (SELECT bes_pro_id FROM bes_sm_pro WHERE bes_sm_id=#{id})")
int bespeakProjectCount(int id);

}
